package com.demo3;import lombok.Data;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Component;import javax.annotation.PostConstruct;import javax.annotation.PreDestroy;@Component@Datapublic class CComponent {    @Autowired    private BComponent bComponent;    private String name;    @PostConstruct    public void postConstruct() {System.out.println("C对象初始化...");}    @PreDestroy    public void preDestroy() {System.out.println("C对象销毁...");}    public void sayHi()    {        System.out.println(this.name + ": hello");    }}